<%@page import="java.net.URLDecoder"%>
<%@page import="domein.*"%>
<%@page import='java.util.Calendar' %>
<%
	String pageTitel = "Agenda bekijken"; //pagina titel wordt getoond in header.jsp
%>
<!-- include header -->
<%@ include file="../skelet/header.jsp"%>
<!-- begin content -->
<div class="span12">
	<div class="hero-unit">

		<h2>Overzicht van uw afspraken</h2>
			<%
				int counter = 1;
				for(Personeel p : AutoTotaalDiensten.getPersoneelbyFunctie("monteur")){
					if(p.getEmail().equals(((Persoon)request.getSession().getAttribute("user")).getEmail())){
						for(AgendaAfspraak aa : p.getAfspraken()){
							out.println("<h5>Afspraak "+counter+"</h5>");
							Calendar date = aa.getStartDatum();
							String dateString = "";
							dateString = dateString + date.get(Calendar.DAY_OF_MONTH);
							dateString = dateString + "-" + date.get(Calendar.MONTH);
							dateString = dateString + "-" + date.get(Calendar.YEAR);
							out.println("<label>Datum:" + dateString + "</label>");
							
							Calendar time = aa.getEindTijd();
							String timeString = "";
							timeString = timeString + time.get(Calendar.HOUR_OF_DAY) +":";
							timeString = timeString + time.get(Calendar.MINUTE);
							out.println("<label>Tijd:" + timeString + "</label>");
							out.println("<label>Omschrijving:" + aa.getOmschrijving() + "</label><br/>");
							counter++;
						}
					}
				}
			%>
	</div>
</div>
<!-- eind content -->

<!-- include footer -->
<%@ include file="../skelet/footer.jsp"%>